<?php
require "function_alias.php";
require "_constants.php";

require(dirname(__FILE__) . '/_config_aliases.php');

return array(
  'sourceLanguage'=>'en',
	
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Samanthafarrugia',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=> require(dirname(__FILE__) . '/_imports.php'),
	/*
	'import'=>CMap::mergeArray(
			// Public Imported
			require(dirname(__FILE__) . '/_imports.php'),
			array(
				'application.extensions.....*',
			)
	),
	*/
	'defaultController'=>'site',

	// application components
	'components'=>array(
		'email'=>array(
				'class'=>'application.extensions.email.Email',
				'delivery'=>'php', //Will use the php mailing function.
				//May also be set to 'debug' to instead dump the contents of the email into the view
		),
		'user'=>array(
			'class'=>'RWebUser',
			// enable cookie-based authentication
			'allowAutoLogin'	=>	true,
			'authTimeout'		=>	1800,
			'loginUrl' 			=> 	array('/user/login'),
			'returnUrl'			=> 	"/user/admin/dashboard",
		),
		//,class Controller extends RightsBaseController
		'authManager'=>array('class'=>'RDbAuthManager'),
											
		'db'=>array(
			'connectionString' => 'sqlite:protected/data/softdevelop_yii.db',
			'tablePrefix' => 'tbl_',
 			'enableProfiling'=>true,
      'enableParamLogging'=>true,
		),
		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
				'errorAction'=>'site/error',
		),
		/*'log'=>array(
		    'class'=>'CLogRouter',
		    'routes'=>array(
		        array(
		            'class'=>'ext.yii-debug-toolbar.YiiDebugToolbarRoute',
		            // Access is restricted by default to the localhost
		            //'ipFilters'=>array('127.0.0.1','192.168.1.*'),
		        ),
		    ),
		),*/
		
		'assetManager' => array(
			'basePath' => dirname(__FILE__) . "/../../wwwroot/assets/",
			'baseUrl' => "/../../wwwroot/assets",
		),
		
		'themeManager'	=> array(
			'basePath'	=> dirname(__FILE__) . '/../../themes/',
			'baseUrl'	=> dirname(__FILE__) . '/../../themes/',
			//'themeNames'	=>	array('frontend', 'backend', 'classic'),
		),
		'urlManager'=>array(
			'urlFormat'=>'path',
			'showScriptName'=>false,
			'rules'=>require(dirname(__FILE__) . '/_routes.php'),
			
		),
		'image'=>array(
			'class'=>'ImgManager',
			'versions'=>array(
				'small'=>array('width'=>120,'height'=>120),
				'medium'=>array('width'=>320,'height'=>320),
				'large'=>array('width'=>640,'height'=>640),
			),
		),
		
	  'widgetFactory' => array(
			'widgets' => array(
				'leftMenuDefault' => array(
				//	'theme'=>'backend',
				//	'themeUrl'=>'widgets'
				),
			),
	  ),
		
		'bootstrap'=>array(
        'class'=>'ext.bootstrap.components.Bootstrap', // assuming you extracted bootstrap under extensions
		),
		
	),

	// Module
	'modules' => CMap::mergeArray(
		// Public Module
		require(dirname(__FILE__) . '/_modules.php'), 
		
		// Private module
		array(
			'rights' => array(
				'userClass' => 'User',
				'superuserName'=>'Admin',
				'authenticatedName'=>'Authenticated',
				'userIdColumn'=>'id',
				'userNameColumn'=>'username',
				'enableBizRule'=>true,
				'enableBizRuleData'=>false,
				'displayDescription'=>true,
				'flashSuccessKey'=>'RightsSuccess',
				'flashErrorKey'=>'RightsError',
				'install'=>false,
				'baseUrl'=>'/rights',
				'layout'=>'rights.views.layouts.main',
				//'appLayout'=>'application.views.layouts.main',
				//'cssFile'=>'rights.css',
				'debug'=>false,

			),
			
			'gii'=>array(
					'class'=>'system.gii.GiiModule',
					'generatorPaths' => array(
						'ext.giix-core', // giix generators
					),
					'password'=>'12345-'
			),
		)
	),
	
	// Set default theme
  'theme'=>'frontend',
	
	'params'	=>	require(dirname(__FILE__) . '/_params.php'), 
);
